$(function(){
    bdshare();
    navHide();
    toTop();
    Comm.Ui.init_lzLoad();
    Comm.Ui.init_tooltip();
});
/** 导航栏若隐若现 */
function navHide() {
    var headroom = new Headroom($("#mr-header")[0], {
        "tolerance": 5,
        "offset": 205,
        "classes": {
            "initial": "c_c",
            "pinned": "slideDown",
            "unpinned": "slideUp"
        }
    });
    headroom.init();
    headroom.destroy();
}
/** 百度分享 */
function bdshare() {
    window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
}

function toTop() {
        if($(this).scrollTop()==0){
            $("#toTop").hide();
        }
        $(window).scroll(function(event) {
            /* Act on the event */
            if($(this).scrollTop()==0){
                $("#toTop").hide();
            }
            if($(this).scrollTop()!=0){
                $("#toTop").show();
            }
        });
        $("#toTop").click(function(event) {
            /* Act on the event */
            $("html,body").animate({
                    scrollTop:"0px"},
                666
            )
        });
}

/*<%--百度统计--%>*/
var _hmt = _hmt || [];
(function () {
    var hm = document.createElement("script");
    hm.src = "//hm.baidu.com/hm.js?7b48cb8bcd42dbe89f577014c9221e43";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();
